約 5,863,759 件
https://w.atwiki.jp/keisks/pages/443.html
Maven+Eclipseで確認。 pom.xmlに追加する(https //logging.apache.org/log4j/2.x/maven-artifacts.html) log4j2.xmlをsrc/java/resource/に配置する。基本的な設定としては ?xml version="1.0" encoding="UTF-8"? configuration status="OFF" Appenders Console name="Console" target="SYSTEM_ERR" // あるいはSYSTEM_OUT PatternLayout pattern="%d{DEFAULT} | [%t] | %-5level | %c{36} | %msg%n"/ /Console File name="File" fileName="logs/nlp4j.log" // 出力先 PatternLayout pattern="%d{yyyy-MM-dd HH mm ss.SSS} | [%t] | %-5level | %c{36} | %msg%n"/ /File /Appenders Loggers Root level="error" // デフォルトの設定 AppenderRef ref="Console"/ // どこに出すか /Root Logger name="com.keisks.nlp4j" level="trace" additivity="false" // パッケージごとの追加設定(上書きされる) AppenderRef ref="Console"/ AppenderRef ref="File"/ // ファイルにも書きたい場合は追加する。Fileという名前は上の File name="File"で設定している /Logger /Loggers /configuration Enjoy logging by log4j2!! PatternLayoutについては http //yamashiro0110.hatenadiary.jp/entry/2014/08/24/093336
https://w.atwiki.jp/mekagazira/pages/15.html
javacでのサーブレットのコンパイル Antでのコンパイル javaでAPIを作成する メモ javacでのサーブレットのコンパイル c \Tomcat6_0_16\webapps\anttest javac -d WEB-INF/classes -cp .;"C \Tomcat6_0_16\lib/servlet-api.jar" src/HelloWorldServlet.java Antでのコンパイル Antのセットアップ ダウンロード http //ant.apache.org/bindownload.cgi PATHを通す ANT_HOMEを設定し、PATHに%ANT_HOME%\binを追加する。 プロジェクトルートにbuild.xmlを置く ?xml version="1.0" encoding="Shift_JIS"? project default="compile" !-- ソースファイルがあるディレクトリ -- property name="src.dir" value="src" / !-- クラスファイルを出力するディレクトリ -- property name="classes.dir" value="WEB-INF/classes" / !-- ライブラリのあるディレクトリ -- property name="lib.dir" value="../../lib" / path id="classpath" fileset dir="${lib.dir}" include name="**/*.jar" / /fileset /path !-- コンパイル -- target name="compile" mkdir dir="${classes.dir}" / javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath" / /target /project ant実行 c \Tomcat6_0_16\webapps\anttest ant Buildfile c \Tomcat6_0_16\webapps\anttest\build.xml compile [javac] c \Tomcat6_0_16\webapps\anttest\build.xml 24 warning includeantruntime was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds [javac] Compiling 1 source file to c \Tomcat6_0_16\webapps\anttest\WEB-INF\classes BUILD SUCCESSFUL Total time 1 second javaでAPIを作成する 以下の様にjspを作成してiniの様な「名前」=「値」で値を返しえあげる。 %@ page language="java" contentType="text/plain; charset=Windows-31J" % return_code= %=request.getAttribute("return_code")% error_reason= %=request.getAttribute("error_reason")% open_date= %=request.getAttribute("open_date")% SYSTEMERROR.txt return_code=9 error_reason=Exception_occured web.xml ?xml version="1.0" encoding="ISO-8859-1"? !DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http //java.sun.com/dtd/web-app_2_3.dtd" web-app servlet servlet-name hogeServlet /servlet-name servlet-class com.mkeka.hogeServlet /servlet-class init-param param-name SQLSTR /param-name param-value SELECT * FROM hogeTable WHERE FLG = 01 AND USER_ID = ? /param-value /init-param init-param init-param param-name RESPONSE_PAGE /param-name param-value RESPONSE.jsp /param-value /init-param /servlet !-- Standard Action Servlet Mapping -- servlet-mapping servlet-name hogeServlet /servlet-name url-pattern /hogeServlet /url-pattern /servlet-mapping error-page error-code 500 /error-code location /SYSTEMERROR.txt /location /error-page error-page exception-type java.lang.Exception /exception-type location /SYSTEMERROR.txt /location /error-page /web-app メモ javax.servletとjavax.servlet.http javax.servlet・・・通信プロトコルに依存しない機能を提供するクラス・インターフェースから構成されている javax.servlet.http・・・HTTPに依存する機能を提供するクラス・インターフェースから構成されている log4j書き方 private static Log log = LogFactory.getLog(hogeServlet.class.getName()); commons-logging.jar log4j-1.2.8.jar #log4j.rootCategory=DEBUG, A1,S1,W1 log4j.rootCategory=DEBUG, A1,W1,S1 # A1 is set to be a FileAppender which outputs to File. log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender log4j.appender.A1.File=/service/log/hogeapp/app.log log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%d{yyyy MM dd HH mm ss} [get39info %t] %-5p %l %m%n log4j.appender.W1=org.apache.log4j.DailyRollingFileAppender log4j.appender.W1.File=/service/log/hogeapp/appwarn.log log4j.appender.W1.Threshold=WARN log4j.appender.W1.layout=org.apache.log4j.PatternLayout log4j.appender.W1.layout.ConversionPattern=%d{yyyy MM dd HH mm ss} [get39info %t] %-5p %l %m%n log4j.appender.S1=org.apache.log4j.net.SyslogAppender log4j.appender.S1.SyslogHost=localhost log4j.appender.S1.Facility=user log4j.appender.S1.Threshold=ERROR log4j.appender.S1.layout=org.apache.log4j.PatternLayout log4j.appender.S1.layout.ConversionPattern=[get39info] %-5p(APL) %l %m%n javaでHelloWorld Ant編 Servlet API Documentation
https://w.atwiki.jp/myoss/pages/45.html
Tomcatのコンソール出力をLog4Jを使用してファイルに出力する方法を示す。 構成情報 Tomcat 5.5.9 JDK 1.5.0_04 Commons Logging 1.0.4 Log4J 1.2.12 設定方法 1.Commons loggingとLog4Jをダウンロードし、[$CATALINA_HOME]/common/libにコピーする。 2.以下の内容で、log4j.propertiesを、[$CATALINA_HOME]/common/classes直下に作成する。 log4j.rootLogger=debug,R log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=${catalina.home}/logs/tomcat.log log4j.appender.R.MaxFileSize=10MB log4j.appender.R.MaxBackupIndex=10 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n log4j.logger.org.apache.catalina=DEBUG, R 3.Tomcatを起動する。 おおぉー、今までコンソール出力されていたものが、[$CATALINA_HOME]/logs/tomcat.logに出力されてますね。 デバックモードやappenderを変えることで、実際の運用でも使用できそうですね。
https://w.atwiki.jp/duke15/pages/31.html
Tomcat project を作り、Struts support, Spring nature をつける コンパイル先が WEB-INF/classes になっていなければ、このフォルダを作り、コンパイル先に指定する。 WEB-INF/jsp を作る WEB-INF/web.xml にdescription がなければ追加しておく web-app description Sample to use JSP, Struts, Spring, Hibernate, etc for JVM stress tests with 1.3 and later. /description display-name Misc web components for tests /display-name ... index.jsp を作り、welcome アクションへのフォワードを指定する %@ taglib uri="/tags/struts-logic" prefix="logic" % logic redirect forward="welcome"/ struts-config.xml に welcome アクションを定義する global-forwards forward name="welcome" path="/Welcome.do"/ ... action-mappings action path="/Welcome" type="org.apache.struts.actions.ForwardAction" parameter="/WEB-INF/jsp/Welcome.jsp" /action ... Welcome.jsp を作成 %@ taglib uri="/tags/struts-bean" prefix="bean" % %@ taglib uri="/tags/struts-html" prefix="html" % %@ taglib uri="/tags/struts-logic" prefix="logic" % body の先頭に次のチェックを入れておく logic notPresent name="org.apache.struts.action.MESSAGE" scope="application" b ERROR Application resources not loaded -- check servlet container logs for error messages. /b /logic notPresent forward 先として使用されるのであれば次のタグも入れておく html errors/ css/global.css を作成, header 内でインクルード body {margin 0; padding 0; background #fff; text-align center; font 12px Lucida Grande , Geneva, Arial, Verdana, sans-serif; color #000;} table, td {font 10px Lucida Grande , Geneva, Verdana, Arial, sans-serif; color #000;} link rel="stylesheet" type="text/css" href="/css/global.css" media="all" 一旦デプロイして表示を確認 フォームを設置 html form action="/DirDiffCheck" focus="sourcepath" table border="0" width="100%" tr th align="right" Source /th td align="left" html text property="sourcePath"/ /td td align="left" html submit property="sourcepath_choose" value="Choose..."/ /td /tr tr th align="right" Destination /th td align="left" html text property="destPass"/ /td td align="left" html form action="/ChoosePath" html submit property="targetpath_choose" value="Choose..."/ /html form /td /tr tr td align="right" html submit property="submit" value="Submit"/ /td td align="left" html reset/ /td /tr /table /html form DirDiffCheck アクションを定義 form-beans form-bean name="ddcForm" type="app.ddcForm"/ ... action-mappings ... action path="/DirDiffCheck" name="ddcForm" type="app.DirDiffCheckAction" scope="request" validate="true" input="/WEB-INF/jsp/Welcome.jsp" forward name="success" path="/WEB-INF/jsp/Welcome.jsp"/ forward name="dchoose" path="/WEB-INF/jsp/DirChoose.jsp"/ /action app.ddcFrom を作成, ActionFrom のサブクラスとする 次のプロパティを用意する private String sourcePath; private String destPath; validate メソッドを用意する public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if ((sourcePath == null) || (sourcePath.length() 1)) { errors.add("sourcePath", new ActionMessage("error.sourcePath.required")); } if ((destPath == null) || (destPath.length() 1)) { errors.add("destPath", new ActionMessage("error.destPath.required")); } return errors; } error.sourcePath.required=Soruce path is required error.destPath.required=Dest path is required JSTL の使用 taglig 定義 %@taglib prefix="c" uri="http //java.sun.com/jstl/core"% jstl.jar, standard.jar を lib に追加 Logging commons-logging は Struts 必須のため、利用できるが、カテゴリ、レベルの 制御を考えると log4j に慣れている場合は log4j を用いたほうが早い。 また log4j.jar は WEB-INF/lib に配置する。コンテナの commons/lib では ClassNotFoundException がおきる(らしい) log4j.xml または log4j.properties は WEB-INF/classes に配置する。 log4j.xml の場合は log4j.configuration の設定がおそらく必要。 log4j.xml ?xml version="1.0" encoding="UTF-8" ? !DOCTYPE log4j configuration SYSTEM "log4j.dtd" log4j configuration xmlns log4j= http //jakarta.apache.org/log4j/ appender name="stdout" class="org.apache.log4j.ConsoleAppender" layout class="org.apache.log4j.PatternLayout" param name="ConversionPattern" value="%5p [%t] (%F %L) - %m%n"/ /layout /appender root priority value="INFO" / appender-ref ref="stdout" / /root /log4j configuration log4j.properties log4j.rootLogger=INFO, stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F %L) - %m%n # log4j.rootLogger=DEBUG, stdout, rolling # log4j.appender.rolling=org.apache.log4j.RollingFileAppender # log4j.appender.rolling.File=output.log # log4j.appender.rolling.MaxFileSize=512KB # log4j.appender.rolling.MaxBackguIndex=1 # log4j.appender.rolling.layout=org.apache.log4j.PatternLayout # log4j.appender.rolling.layout.ConversionPattern=%5p [%t] (%F %L) # category setting # log4j.logging. pkg/class filter =level # log4j.logging.app.pathedit=DEBUG !!!BAD # log4j.category.app.pathedit=DEBUG JSP 内でのロギング Scriptlet の使用 %@ page import="org.apache.commons.logging.Log" % %@ page import="org.apache.commons.logging.LogFactory" % % Log logger = LogFactory.getLog(this.getClass()); % % logger.debug("This is a debug message from a jsp"); % ... % logger.info("This is another log message in the jsp"); % Log custom tag の利用 taglib taglib-uri /WEB-INF/log.tld /taglib-uri taglib-location /WEB-INF/log.tld /taglib-location /taglib このタグライブラリは log4j 依存の様だ。 % taglib uri="/WEB-INF/log.tld" prefix="logger" % logger debug message="This is a debug message from a jsp using the Log tag" / logger info message="This is another message using the log4j tag" / logger dump scope="page"/ logger dump scope="request"/ logger dump scope="session"/ logger dump scope="application"/
https://w.atwiki.jp/yuukari3/pages/14.html
Logging and Tracing in C++ Simplifiedページの翻訳版を記述します。 翻訳は、上記ページを「The翻訳インターネット V7.0LE」または「Excite 翻訳」で翻訳したものを、さらに一部簡単に修正したものです。いい日本語訳などあれば、ご指摘くださると幸いです。 簡略化された C++ のロギングとトレース By Mo Budlong, August 2001 この情報およびコードの例は好意としてSUNより提供されており、「そのまま」であり、SUNは特定の目的、または非侵害のための適応、商用のいかなる保障を含め、それに関係する全ての保証を放棄します。 概要 トレースとロギングは、デバッグの共通の支援であり、デバッグのための重要なパスです。オープンソースlog4CppパッケージはC++アプリケーションでのロギングおよびトレースのセットアップの過程を簡略化します。log4Cppについてのドキュメンテーションは、log4cppオブジェクト一式の使用についてのいくつかの簡単な例が抜けています、そして、この記事はlog4Cppの小さなバグの単純な解決方はもちろん例および説明も提供します。 ロギングとトレース あなたはトレースするべきです。。 わかりますか?あなたは確かに行います、しかし少しバックアップします。もし、あなたが500行以上のアプリケーションを書くか、アプリケーションがデーモンかサービスとして走るか、またはあなたが多くのデバッグの頭痛から自分自身を救いたいのであれば、トレースするべきです。つまり、オリジナルのステートメントを一周できます。あなたは、トレースするべきです。 ああ、しかし、C++プログラムはどのようにそのトレースを行いますか? 手続き型言語(すなわちC)のランクを通って近づいて来たならば、恐らく老練でしょう: #ifdef DEBUG fprintf(trace_file,"Here is a useless trace messagen"); #endif しかし、オブジェクト指向言語は、うーむ・・・オブジェクトは適応させました。トレースファイルに無作為のメッセージを吐くのは全く十分上品であるというわけではありません、まさしくobjectilatedされて、objectiviedされなかった平野は言うまでもなく… 何でも。 あなたは、トレースしロギングするクラスを必要とします。 いいえ、いいえ、既に世話をされるので、それはあなたのためにここで書かれていません。 Ceki Gulcuは、log4jという名のJavaでロギングしトレースするオブジェクトの強力なセットを作成しました。 Bastiaan Bakkerは、同じセットのオブジェクトの大部分をC++に移植し、それをlog4cppと呼びます。それらは、両方ともオープンソースパッケージであり、sourceforge.net および他のオープンソースリポジトリで自由に利用可能です。 ハンマーとのみを使用して、コードが最初に著されて以来、ロギングとトレースをコードへ挿入することは周囲にありました。技術は低次技術です。しかし、それも非常に有効です。それが正確に行われる場合、ソフトウェアを監査する基礎をさらに形成し、実効誤差を記録するツールになることができます。 ロギングはプログラムを遅くすることができます。また、log4jとlog4cppの著者は緩慢を引き起こすコードの部分をぐいとひねるために非常に熱心に働きました。 マトリクスはトレースメッセージのボリュームにおける広い矛盾のために、引用するのが難しい。片端では、あなたは厳しいメッセージしかたどることができません。 #ifdef DEBUG trace("Captain, the dilithium crystals are meltingn"); #endif 他方では、コードのほとんどすべてのラインをトレースすることができます。 トレースのクラスに重要なことは、アプリケーションにおける単なる存在が過度にアプリケーションを遅くするべきでないということです。log4cppパッケージはこの点に関して優れた働きをします。 log4cppがどこで落ちるかは、ドキュメンテーションです。それぞれの個々のクラスは徹底的にドキュメント化されますが、log4cppを使用するためにどうオブジェクトを結びつけるかが少ししかもしくは何もありません。あなたがlog4jについてのドキュメンテーションを追い詰めれば、それは、log4jの使用へはじまりという1つの説となります。 したがって、ロギングとトレースに興味を持っていて、優れて、自由に利用可能なトレースツールを使用したい場合は、読み続けてでください。 log4cppは3つの主なコンポーネントを持っています カテゴリー、付加およびレイアウト。 レイアウトクラスは、出力メッセージがどのように見るかコントロールします。望む任意のスタイルの出力メッセージを指定するためにLayoutから自分のクラスを引き出してもよい。log4Cppは、2つのレイアウトクラス、SimpleLayoutおよびBasicLayoutがあります。 付加クラスはトレースメッセージをあるデバイスに書きます。メッセージはレイアウトオブジェクトによってフォーマットされています。log4Cppは標準出力、名前付きのファイル、ストリングバッファーに「追加する」クラスがあります。Appenderクラスは、Layoutのクラスと共に密接に働いています、また、もう一度、ソケット、シェアード・メモリー・バッファーあるいはある種の遅れた書き込みデバイスに記録したければ、自分のappenderクラスを引き出してもよい。log4Cppは3の有用なappendersがあります FileAppender、OstreamAppenderおよびStringQueueAppender。 カテゴリーのクラスは実際のロギングを行います。カテゴリーの2つの主要部分はそのappendersとその優先度です。優先度は、特定のクラスがどのメッセージを記録することができるかコントロールします。カテゴリーオブジェクトが作成される場合、それは標準出力の標準appenderと優先度無しで動き始めます。ログ出力先リストに、1つもしくは複数のappendersを追加することができます。瞬間に、より多くappendersが存在するでしょう。カテゴリーの優先度は、「logginess」の順序あるいは各メッセージの重要レベルの昇順に、NOTSET、DEBUG、INFO、NOTICE、WARN、ERROR、CRIT、ALERTあるいはFATAL/EMERGと設定することができます。FATALとEMERGは重要な同じ最高水準をもつ2つの名前です。各メッセージはカテゴリーオブジェクトに記録されます。カテゴリーオブジェクトは優先レベルを持っています。メッセージはそれ自身、ログにゆっくり進むようにさらに優先レベルを持っています。メッセージの優先度がカテゴリの優先度より大きな場合、あるいは等しい場合、その時、ロギングは起こります、さもなければ、メッセージが無視されます。カテゴリー優先度は下記のように並べられます: NOTSET DEBUG INFO NOTICE WARN ERROR CRIT ALERT FATAL = EMERG FATALとEMERGは等しく、最高水準です。NOTSETが最も低く、カテゴリーオブジェクトがNOTSET優先度に託される場合、それはどんなメッセージも受理し記録するでしょう。 NOTSETを除いて、これらの優先度のいずれもメッセージに与えることができます。 したがって、もしカテゴリーがWARNレベルに設定されたならば、DEBUGレベル、INFOおよびNOTICEを備えたメッセージは記録されないでしょう。 WARN、ERROR、CRIT、ALERT、FATALあるいはEMERGにセットされたメッセージが記録されるでしょう。 ルート・ノードを備えた木に配置されたカテゴリーは、トップのカテゴリーレベルになります。これは、あなたが層(カテゴリー)へトレースしながら、中断することを可能にします。子供カテゴリーは、最初に作成された時、それらの親カテゴリーの優先度を継承します。実際上、これはあまり有用ではありません。しかし、完全にはlog4Cppを訓練していません。 Appendersはカテゴリーオブジェクトに関する収集として蓄積します。 appenderがカテゴリーに加えられるとき、デフォルトの振る舞いはメッセージの記録のための、記録先リストに追加されるapenderのことである。それは、標準出力に反映させるのと同様に、同時に2ファイルへのログ/トレースをすることが可能でしょう。 実際上、あなたはめったに一度に1つを越える場所へ記録したいとは思わない、また、望む単一の目的地は、ほとんどが標準出力以外です。log4Cppは、additivityフラグを使うことで可能にします。もし、additivityプロパティが偽って設定されれば、そのとき、新しいappenderがカテゴリーオブジェクトに付けられる場合、それは目的地リストに加えられません。代わりに、それは、そのカテゴリーオブジェクト上のappendersの現在のリストを置き換えます。 このすべてがどのように結びつくでしょうか? カテゴリークラスは1つの総合的な静的なルートカテゴリーオブジェクト(ルートと呼ばれた)を作成します。そのアプリケーションは、この1つの静的の親から子供カテゴリーのインスタンスを作成することができます。 ここに、log4Cppを使用する簡単な例があります。 もしあなたが標準出力に送られた単純なレイアウトの基礎的なロギングのセットアップを使用したくなければ、log4Cppログの使用に向けての最初の6ステップがあります appenderオブジェクト生成。 レイアウトオブジェクト生成。 appenderにレイアウトオブジェクトを付与します。 静的な関数log4cpp Category getInstance("name")を呼ぶことでカテゴリーオブジェクト生成。 追加appender(デフォルト標準出力のappenderに加えて)としてカテゴリーにappenderオブジェクトを付与する、もしくは初めにAdditivityをfalseに設定し、そのカテゴリーのための唯一のappenderとしてappenderのインストールをします。 もしあなたが単にすべてを記録したくなければ、カテゴリーのための優先度を設定してください。 // TestLog4CPP.cpp A small exerciser for log4cpp #include"Category.hh" #include"FileAppender.hh" #include"BasicLayout.hh" int main(int argc, char* argv[]) { // 1 instantiate an appender object that // will append to a log file log4cpp Appender* app = new log4cpp FileAppender("FileAppender", "/logs/testlog4cpp.log"); // 2. Instantiate a layout object // Two layouts come already available in log4cpp // unless you create your own. // BasicLayout includes a time stamp log4cpp Layout* layout = new log4cpp BasicLayout(); // 3. attach the layout object to the // appender object app- setLayout(layout); // 4. Instantiate the category object // you may extract the root category, but it is // usually more practical to directly instance // a child category log4cpp Category main_cat = log4cpp Category getInstance("main_cat"); // 5. Step 1 // an Appender when added to a category becomes // an additional output destination unless // Additivity is set to false when it is false, // the appender added to the category replaces // all previously existing appenders main_cat.setAdditivity(false); // 5. Step 2 // this appender becomes the only one main_cat.setAppender(app); // 6. Set up the priority for the category // and is given INFO priority // attempts to log DEBUG messages will fail main_cat.setPriority(log4cpp Priority INFO); // so we log some examples main_cat.info("This is some info"); main_cat.debug("This debug message will fail to write"); main_cat.alert("All hands abandon ship"); // you can log by using a log() method with // a priority main_cat.log(log4cpp Priority WARN, "This will be a logged warning"); // gives you some programmatic control over // priority levels log4cpp Priority PriorityLevel priority; bool this_is_critical = true; if(this_is_critical) priority = log4cpp Priority CRIT; else priority = log4cpp Priority DEBUG; // this would not be logged if priority // == DEBUG, because the category priority is // set to INFO main_cat.log(priority,"Importance depends on context"); // You may also log by using stream style // operations on main_cat.critStream() "This will show up as " 1 " critical message" log4cpp CategoryStream ENDLINE; main_cat.emergStream() "This will show up as " 1 " emergency message" log4cpp CategoryStream ENDLINE; // Stream operations can be used directly // with the main object, but are // preceded by the severity level main_cat log4cpp Priority ERROR "And this will be an error" log4cpp CategoryStream ENDLINE; // This illustrates a small bug in version // 2.5 of log4cpp main_cat.debug("debug");// this is correctly // skipped main_cat.info("info"); main_cat.notice("notice"); main_cat.warn("warn"); main_cat.error("error"); main_cat.crit("crit");// this prints ALERT // main_cat crit main_cat.alert("alert");// this prints PANIC // main_cat alert main_cat.emerg("emerg");// this prints UNKOWN // main_cat emerg main_cat.debug("Shutting down");// this will // be skipped // clean up and flush all appenders log4cpp Category shutdown(); return 0; } この例におけるコードの最終セクションは、log4cppの中のバグを例証します。 BasicLayout()では、メッセージは次のように記録されます date_time PRIORITY category_name message 次のリストはこのプログラムからの出力の例です。crit()メソッドが優先レベルとしてALERTを出力し、alert()メソッドが優先レベルとしてPANICを出力する、また、emerg()が優先レベルとしてUNKNOWNを出力することに注意してください。 995871335 INFO main_cat This is some info 995871335 PANIC main_cat All hands abandon ship 995871335 WARN main_cat This will be a logged warning 995871335 ALERT main_cat Importance depends on context 995871335 ALERT main_cat This will show up as 1 critical message 995871335 UNKOWN main_cat This will show up as 1 emergency message 995871335 ERROR main_cat And this will be an error 995871335 INFO main_cat info 995871335 NOTICE main_cat notice 995871335 WARN main_cat warn 995871335 ERROR main_cat error 995871335 ALERT main_cat crit 995871335 PANIC main_cat alert 995871335 UNKOWN main_cat emerg 恐らく最後の最後、オープンソースの美に行き着きます。バグは見つかりましたか?ただ進んで、それを修正してください。 次のリストは、log4cppの十分な分配の一部である、Priority.cppファイルのコピーです。 優先度の名前は静的な配列から作成され、インデックスは優先度番号に基づいて作成されます。 /* * Priority.cpp * * Copyright 2000, LifeLine Networks BV * (www.lifeline.nl). All rights reserved. * Copyright 2000, Bastiaan Bakker. All rights reserved. * See the COPYING file for the terms of usage and * distribution. */ #include "Portability.hh" #include "Priority.hh" namespace log4cpp { const std string Priority getPriorityName(int priority) throw() { static std string names[9] = { "PANIC", "ALERT", "ERROR", "WARN", "NOTICE", "INFO", "DEBUG", "NOTSET", "UNKOWN" }; priority++; priority /= 100; return (*1) ? names[8] names[priority - 1]; } } しかし、優先順位番号は、この機能がPriority.hhからの抜粋で以下に示すように予期するより、わずかに異なります。 typedef enum { EMERG = 0, FATAL = 0, ALERT = 100, CRIT = 200, ERROR = 300, WARN = 400, NOTICE = 500, INFO = 600, DEBUG = 700, NOTSET = 800 } PriorityLevel; したがって、修正は以下のように(変更が強調されます)配列とコードを調節することです。 /* * Priority.cpp * * Copyright 2000, LifeLine Networks BV (www.lifeline.nl). * All rights reserved. * Copyright 2000, Bastiaan Bakker. All rights reserved. * * See the COPYING file for the terms of usage and * distribution. */ #include "Portability.hh" #include "Priority.hh" namespace log4cpp { const std string Priority getPriorityName(int priority) throw() { static std string names[10] = { "PANIC", "ALERT", "CRITICAL", "ERROR", "WARN", "NOTICE", "INFO", "DEBUG", "NOTSET", "UNKOWN" }; priority++; priority /= 100; return (*2) ? names[9] names[priority]; } } log4cppは非常に柔軟で親しみがあります。あなたが望むすべての方法および多数の出力先へのログをフォーマットするためにそれを修正することができます。それは多くのプロジェクトで、あなたから多くの開発時間を省くでしょう。Bakker氏に敬意を評します。 log4Cppは、まだまだ欠けている1つの重大な断片です。Javaバージョンlog4jは、コードを修正する必要なしに、プログラムの「logginess」を変更することができるようなXMLまたは他の設定ファイルから構成をとるConfiguratorクラスを含んでいました。これはlog4cppへのダイナマイトな追加になるでしょう。 これは何か考えをあなたに与えますか? リソース sourceforge.netはオープンソースソフトウェアのための素晴らしいリソースです。 log4cppと log4jと同様に、あなたはPerlのためのlog4p、Pythonのための別の log4p、および log4dなど、デルフォイのための同様の口ギング機能を作成するための進行中のプロジェクトを見つけるでしょう。 log4jの使用への入門、およびlog4cppに対して適用性を持っている他のドキュメンテーションは、The JakartaProjectにあります。 著者に関して Mo BudlongはKing Computer Servicesの社長で、15年以上の間UNIX(R) boxesの上のユーティリィティ、アプリケーションおよびクライアントサーバソリューションを作成しています。彼は、アセンブリ言語からXMLにまで及び、それらを対象に多数の本および記事を出版しました。彼はウェブ・ベースのUNIX 101カラムの著者で、すぐにUNIX basicsについての本を出版しています。さらに、Moは、ギター、バスおよびキーボードを演奏し、他のいくつかの楽器をいじる音楽家です。彼は、妻、娘および猫と南カリフォルニアで暮らします。 2001年8月 名前 コメント
https://w.atwiki.jp/aias-closurecompiler/pages/25.html
トップページ Closure Compiler Application Closure Compiler Application コマンドラインオプション このページでは、Closure Comiler Applicationのコマンドラインオプションについて詳細に説明します。Closure Comiler Applicationの使用方法についてはこちらを参照してください。 このページは--helpオプションで出力されるヘルプの情報を元に作成しました。尚、管理人が使い方を理解できなかったオプションについてはヘルプの原文(英語)をそのまま記載しています。 目次 主なオプション --charset --compilation_level --externs --formatting --help --js --js_output_file --manage_closure_dependencies --use_only_custom_externs --warning_level その他のオプション --compute_phase_ordering --create_name_map_files --create_source_map --debug --define (--D, -D) --jscomp_dev_mode (--dev_mode) --jscomp_error --jscomp_off --jscomp_warning --logging_level --module --module_output_path_prefix --module_wrapper --output_manifest --output_wrapper --output_wrapper_marker --print_ast --print_pass_graph --print_tree --process_closure_primitives --property_map_input_file --property_map_output_file --summary_detail_level --third_party --variable_map_input_file --variable_map_output_file 主なオプション --charset --charset VAL 全ての入力ファイルの文字エンコーディングを指定します。(入力ファイルは全て同じ文字エンコーディングを使用していなくてはなりません。)省略した場合、ファイルの文字エンコーディングは UTF-8 であると解釈されます。 --compilation_level --compilation_level [WHITESPACE_ONLY|SIMPLE_OPTIMIZATIONS|ADVANCED_OPTIMIZATIONS] JavaScriptに適用する圧縮と最適化の度合い(コンパイルレベル)を指定します。以下の3つのレベルがあります: WHITESPACE_ONLY JavaScriptから空白・改行とコメントだけを削除します。 SIMPLE_OPTIMIZATIONS WHITESPACE_ONLY での処理に加えてローカル変数のリネームを行い、コードの圧縮と最適化を行います。このレベルではコンパイルされたコードとそれ以外のコードとの連携が妨げられることはありません。 ADVANCED_OPTIMIZATIONS SIMPLE_OPTIMIZATIONS での処理に加えてグローバル領域を含むシンボルのリネームを行い、最高レベルの圧縮度を実現します。 ADVANCED_OPTIMIZATIONS を使用する場合、外部のシンボルとの参照関係を維持するために追加の手順を実行する必要があります。 ADVANCED_OPTIMIZATIONS レベルのコンパイル処理が求める様々な制約については、こちらを参照してください。 オプション指定を省略した場合は SIMPLE_OPTIMIZATIONS が適用されます。 --externs --externs VAL コンパイル対象となっていないコード上で定義されたシンボル名がリネームされるのを防ぐためのexternファイルを指定します。このオプションが効果をもつのはcompilation_levelオプションの値が ADVANCED_OPTIMIZATIONS の場合のみです。externに関して詳しくはこちらを参照してください。 複数のexternファイルがある場合はこのオプションを複数指定してください。 --formatting --formatting [pretty_print|print_input_delimiter] 出力されるコンパイル済みJavaScriptコードの整形方式を指定します。このオプションは pretty_print または print_input_delimiter のどちらかの値をとりますが、2つの formatting オプションによってこれらを同時に指定することが可能です。 pretty_print と print_input_delimiter は整形方法のそれぞれ異なる側面についての指示であるため、重複しても互いに影響しあうことがありません。 pretty_print 人間が読み易くなるよう出力コードに改行とインデントを付加します。以下にその例を示します: function hello(a) { alert("Hello, " + a) } hello("New user"); pretty_print がない場合は次のようになります。 function hello(a){alert("Hello, "+a)}hello("New user"); print_input_delimiter 各入力ファイルの範囲を示す文字列を出力コード内に付加します。例えば2つのファイルを一緒にコンパイルした場合、出力は次のようになります: // Input 0 alert("hi"); // Input 1 alert("bye"); ファイル間の境界を表す区切り文字としてClosure Compilerは「 // Input X 」を挿入します。これらの区切り文字はコメントであり、JavaScriptの動作を妨げない点に注意してください。入力ファイルの区切りには、例えば各ファイルのサイズ圧縮度の把握を助けるというような用途が考えられます。 --help --help コンソールにオプションのリストを表示し、処理を終了します。 --js --js VAL 入力JavaScriptファイル名を指定します。複数の入力ファイルがある場合はオプションを複数指定してください。このオプションが未指定の場合、出力結果は空文字列となります。 --js_output_file --js_output_file VAL 出力ファイル名を指定します。省略した場合、処理結果は標準出力に出力されます。 --manage_closure_dependencies --manage_closure_dependencies [true|false] true を指定した場合、 goog.provide で定義されたシンボルは必ずそれを要求する goog.require より前に存在する、という関係に基づいて自動的にファイルのソートを実行します。もし定義されたシンボルが一度も要求されなかった場合、そのシンボルはコンパイル結果から除外されます。このオプションの詳細についてはこちらを参照してください。デフォルトは false です。 --use_only_custom_externs --use_only_custom_externs [true|false] Closure Compilerは document オブジェクトやそのメソッドのような標準的なシンボルを宣言したexternファイルを持っており、デフォルトではそれを使用してシンボル名の保護を行います。 --use_only_custom_externs オプションに true を指定するとこれらの標準的なexternを使用しなくなります。デフォルトのextern宣言に関する詳細はこちらを参照してください。デフォルトは false です。 --warning_level --warning_level [QUIET|DEFAULT|VERBOSE] コード内の問題になりそうな箇所に関する情報の量を指定します。警告レベルには以下の3種類があります: QUIET 現在のコンパイルでのcompilation_levelに基づく最適化パスで生成された文法エラーと警告のみを出力します。 DEFAULT 最適化パスで生成された文法エラーと警告に加え、選択されたコードチェックパス上で生成された警告を出力します。 warning_level オプションのデフォルト値です。 VERBOSE 最適化パスで生成された文法エラーと警告に加え、実行された全てのコードチェックパス上で生成された警告を出力します。 エラーと警告は標準エラー出力に出力されます。 その他のオプション --compute_phase_ordering --compute_phase_ordering Runs the compile job many times, then prints out the best phase ordering from this run. --create_name_map_files --create_name_map_files [true|false] If true, variable renaming and property renaming map files will be produced as {binary name}_vars_map.out and {binary name}_props_map.out. Note that this flag cannot be used in conjunction with either variable_map_output_file or property_map_output_file. --create_source_map --create_source_map VAL Closure Inspectorのソースマッピング機能で使用するソースマップファイルの出力ファイルパスを指定します。ソースマップファイルにはコンパイルされたコードとオリジナルのコードとの位置関係がマッピングされています。指定に %output% という文字列を含めると、それはコンパイル結果の出力ファイル名がその位置に展開されるプレースホルダとして機能します。 --debug --debug [true|false] true を指定するとデバッグ用の出力を行ないます。デフォルトは false です。 --define (--D, -D) --define (--D, -D) VAL @define タグが付けられた変数を指定の値で上書きします。このオプションの値の書式は name [= val ] で、 name には @define タグが付与された変数の名前を、 val には置き換えたい値を指定します。 val の値にはブール値、数値、シングルクォートされた文字列(ただしシングルクォートを含まない)を使用できます。 val が省略された場合は true が適用されます。 このオプションについてはこちらも参照してください。 --jscomp_dev_mode (--dev_mode) --jscomp_dev_mode (--dev_mode) [OFF|START|START_AND_END|EVERY_PASS] Turns on extra sanity checks. --jscomp_error --jscomp_error VAL Make the named class of warnings an error. Options accessControls, checkRegExp, checkTypes, checkVars, deprecated, fileoverviewTags, invalidCasts, missingProperties, nonStandardJsDocs, strictModuleDepCheck, undefinedVars, unknownDefines, visibility --jscomp_off --jscomp_off VAL Turn off the named class of warnings. Options accessControls, checkRegExp, checkTypes, checkVars, deprecated, fileoverviewTags, invalidCasts, missingProperties, nonStandardJsDocs, strictModuleDepCheck, undefinedVars, unknownDefines, visibility --jscomp_warning --jscomp_warning VAL Make the named class of warnings a normal warning. Options accessControls, checkRegExp,checkTypes, checkVars, deprecated, fileoverviewTags, invalidCasts, missingProperties, nonStandardJsDocs, strictModuleDepCheck, undefinedVars, unknownDefines, visibility --logging_level --logging_level VAL The logging level (standard java.util.logging.Level values) for Compiler progress. Does not control errors or warnings for the JavaScript code under compilation. --module --module VAL A javascript module specification. The format is name num-js-files [ [ dep ,...][ ]]]. Module names must be unique. Each dep is the name of a module that this module depends on. Modules must be listed in dependency order, and js source files must be listed in the corresponding order. Where --module flags occur in relation to --js flags is unimportant --module_output_path_prefix --module_output_path_prefix VAL Prefix for filenames of compiled js modules. module-name .js will be appended to this prefix. Directories will be created as needed. Use with --module. --module_wrapper --module_wrapper VAL An output wrapper for a javascript module (optional). The format is name wrapper . The module name must correspond with a module specified using --module. The wrapper must contain %s as the code placeholder. --output_manifest --output_manifest VAL 値としてファイル名を指定し、コンパイルされた全てのファイルのリストをそこに出力します。--manage_closure_dependenciesオプションが有効な場合、使用されなかったためにコンパイル対象にならなかったファイルはリストから除外されます。The %outname% placeholder expands to the js output file. If you re using modularization, using %outname% will create a manifest for each module. このオプションについてはこちらも参照してください。 --output_wrapper --output_wrapper VAL このオプションに指定された文字列にコンパイル結果を内包して出力させます。以下に例を示します: --output_wrapper (function(){%output%})() %output% がコンパイルされたコードのプレースホルダとなります。上のような形式で出力するとコンパイルされたコードのスコープは外側の関数内に限定されるため、リネームされたシンボルによるグローバル領域の汚染を防止することができます。デフォルトのプレースホルダ %output% は--output_wrapper_markerによって任意の文字列に変更できます。 --output_wrapper_marker --output_wrapper_marker VAL --output_wrapperオプションにおいてコンパイルされたコードのプレースホルダとして使用されるトークン文字列を指定します。 --print_ast --print_ast Prints a dot file describing the internal abstract syntax tree and exits. --print_pass_graph --print_pass_graph Prints a dot file describing the passes that will get run and exits. --print_tree --print_tree Prints out the parse tree and exits. --process_closure_primitives --process_closure_primitives [true|false] goog.require() 、 goog.provide() 、 goog.exportSymbol() のようなClosure Libraryの関数をコンパイル時にコードに展開します。デフォルトは true です。 ヘルプには上のように書かれていますが、管理人の試した限りでは展開されるのは goog.require() と goog.provide() だけのようでした。 --property_map_input_file --property_map_input_file VAL File containing the serialized version of the property renaming map produced by a previous compilation. --property_map_output_file --property_map_output_file VAL File where the serialized version of the property renaming map produced should be saved. --summary_detail_level --summary_detail_level N Controls how detailed the compilation summary is. Values 0 (never print summary), 1 (print summary only if there are errors or warnings), 2 (print summary if type checking is on, see --check_types), 3 (always print summary). The default level is 1. --third_party --third_party Check source validity but do not enforce Closure style rules and conventions. --variable_map_input_file --variable_map_input_file VAL File containing the serialized version of the variable renaming map produced by a previous compilation. --variable_map_output_file --variable_map_output_file VAL File where the serialized version of the variable renaming map produced should be saved.
https://w.atwiki.jp/syusei/pages/13.html
log4j.propetiesのサンプル log4j.rootCategory=INFO, STDOUT # stdout log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout log4j.appender.STDOUT.layout.ConversionPattern=%d{HH mm ss} %-5p %m (%c)%n
https://w.atwiki.jp/pjkyt/pages/15.html
日本語 What s this? As far as I know, Android SDK has no offering of standard FileDialog as it exists for Java SE. I thought it might help to make something simple available. It s just a toy code. Feel free to do anything with it. Download What it does It works in four modes 1. Select file 2. Create file 3. Select directory 4. Create directory In mode 1 and 3, the file dialog have the user select existing file / directory. User can navigate through the file system up and down and tap on the desired the file (Figure 1). In case of selecting directory, user can press Here to specify the current directory. In mode 2 and 4, the file dialog have the user enter the new file / directory name that he wishes to create. User can navigate through the file system up and down and tap Here to designate where the file should be created (Figure 2). Then a text box dialog appears and asks for the new file / directory name (Figure 3). In case a file is selected, the text box is brought up with the selected file name filled in. How it works Here s an example code you ll find in the download package. The code inside onCreate() corresponds to the four mode explained above. The first argument is the initial directory. The second and third controls the mode. And the fourth and fifth passes the Context and FileDialogue.Listener. FileDialogue.Listener must be implemented to receive the result from FileDialogue. fd.showDialogue() launches the dialog box. When user has made selection, onSelected() is invoked with the directory and file name as an argument (filename will be "" when ). Else when user has pressed the "back" button, onCanceled() is invoked. That s it! public class FdExample extends Activity implements FileDialogue.Listener { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); // (1) Select file, starting direcotry is /sdcard/ FileDialogue fd = new FileDialogue(null, FileDialogue.FILE, FileDialogue.SELECT, this, this); // (2) Create file, starting direcotry is /sdcard/, user will be requested to enter filename // FileDialogue fd = new FileDialogue("/sdcard/picture/", FileDialogue.FILE, FileDialogue.CREATE, this, this); // (3) Select directory, starting direcotry is /sdcard // FileDialogue fd = new FileDialogue(null, FileDialogue.DIRECTORY, FileDialogue.SELECT, this, this); // (4) Create directory, starting direcotry is /sdcard/, user will be requested to enter direcotry name // FileDialogue fd = new FileDialogue(null, FileDialogue.DIRECTORY, FileDialogue.CREATE, this, this); fd.showDialogue(); } public void onSelected(String directory, String filename) { // filename will be "" when target is the FileDialogue.DIRECOTRY Log.v("FdExample", "Directory = " + directory + ", File = " + filename); } public void onCanceled() { // this is when "back" button is pressed Log.v("FdExample", "Canceled"); } } Is this as good as it gets? Actually, I had never liked the file dialog in general. It is rather tiring to use it. As it is launched, I must resolve where I am now and plan how I should travel to the objective location. It s a lot of screen interpretation, a lot of structural memory challenge, and not even a hint of joy. It it one UI scheme that abuses the weak parts of the human capability. So we have some idea going. We are thinking we can create a better alternative that can take advantage of parallel processing of visual image and geometric / chromatic memory -- human is much better at those. It will be quick to get desired location, much less stressful to use, and hopefully fun. I hope we can implement the idea quickly and make available through this wiki soon. アルバイトはじめましたd(´∀`*)グッ♪ http //www.e29.mobi/ -- (わかりません) 2012-01-05 04 12 48 名前 コメント すべてのコメントを見る
https://w.atwiki.jp/mynote/pages/11.html
IntelMacでPovray IntelMacではPovrayが起動時に突然終了してしまうので、UNIX版を落として来て readmeファイルにある通り ======================== Compiling and installing ======================== Basic and detailed instructions to compile and install the generic POV-Ray source code on UNIX-based systems are given in the INSTALL file. In a nutshell the package installation is based on a configure script which detects your environment automatically and adapts the compilation and installation process accordingly. Simply run % ./configure COMPILED_BY="your name email@address " # configure the package % make # build the program % su # log as root $ make install # install program + data Please consult the INSTALL file for further details. POV-Ray 3.5 was the first effort at an official version of POV-Ray using a configure script and Makefiles generated by the GNU autoconf and automake tools. In POV-Ray 3.6 the configure script and accompanying files have been completely rewritten to work with as many platforms as possible, including systems that are missing some required libraries; see below. We hope that not only Linux but many (if not all) UNIX-based platforms will benefit from the new configure script. 449 cat readme 450 ./configure 451 ./configure COMPILED_BY="xxxx xxxx@xxxx.co.jp " 452 make 453 su 454 make install ではInstallできない、Macの場合はX11でsuでrootになり、 yama07 /Users/macmini/povray$ su Password yama07 /Users/macmini/povray root#make install で〜〜/povray/unixディレクトリに[povray]ってのが できてるから、 cp povray /sw/bin でおk $povray で実行できる レタリング 作業ディレクトリに行き $ povray test.pov でレタリングしてくれる オプションとして+W,+H等がある オプション一覧?(ただのコピペ) Parsing options I name = input file name HI name = header include file name L name = library path prefix MVn.n = set compability to version n.n SU = split bounded unions if children are finite UR = remove unnecessary bounding objects Output options Hn = image height of n pixels Wn = image width of n pixels SRn|0.n = start at row n | start row at n percent of image ERn|0.n = end at row n | end row at n percent of image SCn|0.n = start at col n | start col at n percent of image ECn|0.n = end at col n | end col at n percent of image C = continue aborted trace P = pause before exit V = verbose messages on WLn = set warning level to n X[n] = enable early exit by key hit (every n pixels) Output options - display related D[xy] = display rendering (in format x, using palette option y) SPn = display mosaic preview, start grid size = 2, 4, 8, 16, ... EPn = display mosaic preview, end grid size = 2, 4, 8, 16, ... UD = draw vista rectangles Output options - file related B[n] = Use buffer (of n KB) for output file F[x] = write output file (in format x) FC - Compressed Targa with 24 or 32 bpp FN[n] - PNG (n bits/color, n = 5 to 16, default is 8) FP - PPM FS - System specific FT - Uncompressed Targa with 24 or 32 bpp O name = output file name HTx = write CPU utilization histogram in format x HTC - Comma separated values (CSV - spreadsheet) HTN - PNG grayscale HTP - PPM heightfield HTS - System specific HTT - Uncompressed TGA heightfield HTX - No histogram output HN name = histogram filename HSx.y = histogram grid number of x, y divisions Tracing options MB[n] = use bounding slabs (if more than n objects) Qn = image quality (0 = rough, 9 = full) A[0.n] = perform antialiasing (if color change is above n percent) AMn = use non-adaptive (n=1) or adaptive (n=2) supersampling J[n.n] = set antialiasing-jitter (and amount) Rn = set antialiasing-depth (use n X n rays/pixel) UA = use alpha channel UL = use light buffer UV = use vista buffer Animation options Kn.n = set frame clock to n.n KFIn = set initial frame number to n KFFn = set final frame number to n KIn.n = set initial clock value to n.n KFn.n = set final clock value to n.n SFn|0.n = start subset at frame n | start at n percent in sequence EFn|0.n = end subset at frame n | end at n percent in sequence KC = calculate clock value for cyclic animation UF = use field rendering UO = use odd lines in odd frames Redirecting options GI name = write all .INI parameters to file name Gx name = write stream x to console (and/or optional file name) GA - All streams (except status) GD - Debug stream GF - Fatal stream GR - Render stream GS - Statistics stream GW - Warning stream オプション一覧?(ちょっと通訳) Parsing options(構造オプション) I name = インプットするファイルネーム $ povray test.pov でも可能だが $ povray +I test.pov が正式? HI name = header include file name L name = いつも呼び込むライブラリがあるディレクトリパス library path prefix MVn.n = set compability to version n.n SU = split bounded unions if children are finite UR = remove unnecessary bounding objects Output options Hn = Outputイメージファイルの高さ指定image height of n pixels Wn = Outputイメージファイルの高さ指定image width of n pixels $ povray test.pov +W640 +H480 デフォルトでは幅320pix,高さ240pixになってます SRn|0.n = start at row n | start row at n percent of image ERn|0.n = end at row n | end row at n percent of image SCn|0.n = start at col n | start col at n percent of image ECn|0.n = end at col n | end col at n percent of image C = continue aborted trace P = pause before exit V = verbose messages on WLn = set warning level to n X[n] = enable early exit by key hit (every n pixels) Output options - display related D[xy] = display rendering (in format x, using palette option y) SPn = display mosaic preview, start grid size = 2, 4, 8, 16, ... EPn = display mosaic preview, end grid size = 2, 4, 8, 16, ... UD = draw vista rectangles Output options - file related B[n] = Use buffer (of n KB) for output file F[x] = write output file (in format x) FC - Compressed Targa with 24 or 32 bpp +FC 24ビットTGA圧縮ファイル $povray +FC source.pov FN[n] - PNG (n bits/color, n = 5 to 16, default is 8) +FN 24ビットPNGファイル $povray +FN[8] source.pov FP - PPM +FP 24ビットPPMファイル $povray +FP source.pov FS - System specific +FS システム標準(Windows:BMP,Mac PNG,Linux PNG)[デフォルト] $povray source.pov -これでO.K FT - Uncompressed Targa with 24 or 32 bpp +FT 24ビットTGA非圧縮ファイル $povray +FT source.pov O name = output file name HTx = write CPU utilization histogram in format x HTC - Comma separated values (CSV - spreadsheet) HTN - PNG grayscale HTP - PPM heightfield HTS - System specific HTT - Uncompressed TGA heightfield HTX - No histogram output HN name = histogram filename HSx.y = histogram grid number of x, y divisions Tracing options MB[n] = use bounding slabs (if more than n objects) Qn = image quality (0 = rough, 9 = full) A[0.n] = perform antialiasing (if color change is above n percent) AMn = use non-adaptive (n=1) or adaptive (n=2) supersampling J[n.n] = set antialiasing-jitter (and amount) Rn = set antialiasing-depth (use n X n rays/pixel) UA = use alpha channel UL = use light buffer UV = use vista buffer Animation options Kn.n = set frame clock to n.n KFIn = set initial frame number to n KFFn = set final frame number to n $ povray test.pov +KFF100 clock関数?を使った時test001.png~test100.png まで100個の静止画ファイルを作る KIn.n = set initial clock value to n.n KFn.n = set final clock value to n.n SFn|0.n = start subset at frame n | start at n percent in sequence EFn|0.n = end subset at frame n | end at n percent in sequence KC = calculate clock value for cyclic animation UF = use field rendering UO = use odd lines in odd frames Redirecting options GI name = write all .INI parameters to file name Gx name = write stream x to console (and/or optional file name) GA - All streams (except status) GD - Debug stream GF - Fatal stream GR - Render stream GS - Statistics stream GW - Warning stream LAM-MPIを使用してコンパイル、リンクしたparapovがうまく走らん(以下Error) [cfd@utmcc010 advanced]$ mpirun -np 4 povray benchmark.pov Warning Warning Could not set priority Success Could not set priority Success Persistence of Vision(tm) Ray Tracer Version 3.5 Unix (.Linux.gcc) This is an unofficial version compiled by Benajmin Goldbach benny.goldbach@t-online.de and Matthias Fueller matthias_fueller@web.de - ParaPov Version 1.0 The POV-Ray Team(tm) is not responsible for supporting this version. Copyright 1991-2002 POV-Ray Team(tm) This is Parapov V1.0, a parallel extension to povray Warning Could not set priority Success Parsing Options Input file benchmark.pov (compatible to version 3.5) Remove bounds........On Split unions........Off Library paths /usr/local/share/povray-3.5 /usr/local/share/povray-3.5/include Output Options Image resolution 320 by 240 (rows 1 to 240, columns 1 to 320). Output file benchmark.png, 24 bpp PNG Graphic display......On (type 0, palette 3, gamma 2.2) Mosaic preview......Off CPU usage histogram.Off Continued trace.....Off Allow interruption..Off Pause when done.....Off Verbose messages.....On Tracing Options Quality 9 Bounding boxes.......On Bounding threshold 3 Light Buffer.........On Vista Buffer.........On Draw Vista Buffer...Off Antialiasing........Off Animation Options Clock value.... 0.000 (Animation off) ParaPov Options Block Width.......32 Block Height......32 Client Niceness...5 Client Logging....On Redirecting Options All Streams to console.........Off Debug Stream to console.........On Fatal Stream to console.........On Render Stream to console........On Statistics Stream to console....On Warning Stream to console.......On Starting frame 0... Displaying frame 0...Xlib connection to " 0.0" refused by server Xlib No protocol specified File Init Error The display 0.0 is not a valid display, MPI_Recv process in local group is dead (rank 1, comm 3) Rank (2, MPI_COMM_WORLD) Call stack within LAM Rank (2, MPI_COMM_WORLD) - MPI_Recv() Rank (2, MPI_COMM_WORLD) - MPI_Barrier() Rank (2, MPI_COMM_WORLD) - MPI_Barrier() Rank (2, MPI_COMM_WORLD) - main() One of the processes started by mpirun has exited with a nonzero exit code. This typically indicates that the process finished in error. If your process did not finish in error, be sure to include a "return 0" or "exit(0)" in your C code before exiting the application. PID 32069 failed on node n0 (202.13.13.16) due to signal 13. MPI_Recv process in local group is dead (rank 1, SSI coll smp local comm for CID 0) Rank (3, MPI_COMM_WORLD) Call stack within LAM Rank (3, MPI_COMM_WORLD) - MPI_Recv() Rank (3, MPI_COMM_WORLD) - MPI_Bcast() Rank (3, MPI_COMM_WORLD) - MPI_Barrier() Rank (3, MPI_COMM_WORLD) - main() [cfd@utmcc010 advanced]$ date 2007年 1月 4日 木曜日 22 00 18 JST
https://w.atwiki.jp/eathena/pages/20.html
// Athena Character configuration file. // Note "Comments" are all text on the right side of a double slash "//" // Whatever text is commented will not be parsed by the servers, and serves // only as information/reference. //訳)メモ:コメントを書く際はすべてのテキストにおいて行頭にスラッシュを二つ次のように入れてください「//」 //これをすることにより、サーバーで読み込まなくなります。注釈等で使用可能です。 // // Server Communication username and password. //サーバー間通信に使われるIDおよびパスワード userid s1 passwd p1 // Server name, use alternative character such as ASCII 160 for spaces. // NOTE Do not use spaces in the name, or guild emblems won t work client-side! //サーバーの名前。不明 //メモ 名前にスペースを使わないこと。ギルドエンブレムがクライアント側で正常動作しなくなります。 server_name KlonosServer // Wisp name for server used to send wisp from server to players (between 4 to 23 characters) //サーバーの総合的な名前(?)サーバーからプレイヤーへ束(?)を送る際に使用されます wisp_server_name Server // Login Server IP // The character server connects to the login server using this IP address. // NOTE This is useful when you are running behind a firewall or are on // a machine with multiple interfaces. //ログインサーバーのIPアドレス //キャラクターサーバーはこのアドレスを使用し、ログインサーバーへ接続します。 //メモ これは貴方がファイアーウォールを使用しているか、複数の機械を使っている場合に役に立ちます。 // login_ip 127.0.0.1 // The character server listens on the interface with this IP address. // NOTE This allows you to run multiple servers on multiple interfaces // while using the same ports for each server. //bind_ip 127.0.0.1 // Login Server Port //ログインサーバーの使用するポート login_port 6900 // Character Server IP // The IP address which clients will use to connect. // Set this to what your server s public IP address is. //キャラクターサーバーのIPアドレス //このIPアドレスはクライアントが接続する際に使用されます。 //貴方のサーバーのグローバルIPをセットしてください。 char_ip klonos.ddo.jp // Character Server Port //キャラクターサーバーの使用するポート char_port 6121 //Time-stamp format which will be printed before all messages. //Can at most be 20 characters long. //Common formats // %I %M %S %p (hour minute second 12 hour, AM/PM format) // %H %M %S (hour minute second, 24 hour format) // %d/%b/%Y (day/Month/year) //For full format information, consult the strftime() manual. //タイムスタンプのフォーマット。これはすべてのメッセージに適用されます。 //最高20文字の長さまで可能です //フォーマットの例 // %I %M %S %p (時 分 秒 12時間表示) // %H %M %S (時 分 秒, 24時間表示) // %d/%b/%Y (日/月/年) //個人的メモ 下の場合、日/月/時/分表示 //timestamp_format [%d/%b %H %M] //If redirected output contains escape sequences (color codes) stdout_with_ansisequence no //Makes server output more silent by ommitting certain types of messages //1 Hide Information messages //2 Hide Status messages //4 Hide Notice Messages //8 Hide Warning Messages //16 Hide Error and SQL Error messages. //32 Hide Debug Messages //Example "console_silent 7" Hides information, status and notice messages (1+2+4) //サーバーが出力するメッセージを規制することができます //1 Informationメッセージを隠す //2 Statusメッセージを隠す //4 Noticeメッセージを隠す //8 Warningメッセージを隠す //16 Error および SQL Error メッセージを隠す //32 Debugメッセージを隠す //例 次のような場合→"console_silent 7"information, status、noticeメッセージを隠す (1+2+4) console_silent 0 // Console Commands // Allow for console commands to be used on/off // This prevents usage of log.file console off // Option to force a player to create an e-mail. // If a player have default e-mail, and if you activate this option, the player can only connect in the game (to arrive on a map) like follow // - Create at least 1 character // - Select 1 character // - Select DEL to enter his/her e-mail. (if OK is choosen, client says to the player invalid e-mail ) // - If his/her e-mail is correct, the player enter in the game (an e-mail is saved definitively). // - If his/her e-mail is incorrect, he/she have incorrect e-mail and must select again DEL. // - After entering in the game (when the player arrives on a map), DEL and SEL/OK button work normaly for all next connections. // Resume If a player have "incorrect/invalid e-mail" when he/she click on OK button, // the player must click DEL button and register his/her NEW e-mail to enter in the game // So, default is 0, because administrator must explain to their players before to activate this option. email_creation 0 // キャラクターサーバーをメンテナンスモードにするか。 // 1を入力することでメンテナンスモードに入り、GM以外接続できないようになります char_maintenance 0 // Enable or disable creation of new characters. // Now it is actually supported [Kevin] // 新しいキャラクターの作成を許可するかしないか。 // これはKevin氏によりサポートされています。 char_new 1 // Display (New) in the server list. // 新しいサーバーリストを見せるか(?) char_new_display 0 // Maximum users able to connect to the server. Set to 0 for unlimited. // サーバーに接続できる最大人数。 // 無制限にするには「0」を入力してください。 max_connect_user 0 // When set to yes, the char server will refuse connections from players already online. // When a login attempt is rejected, the account in question will be booted from all the connected map servers. // Note that this only works within the char-server and it s connected mapservers, // the charserver cannot know if the same account is logged on in other char servers. // it s safe to turn off if the char-server only has a single map-server connected to it. // yesにセットすると、キャラクターサーバーはすでにログインしているプレイヤーからの接続を拒否します。 // ログイン試行が拒否される時、問題のアカウントは、すべてのMAPサーバーから排除されます。 // Note that this only works within the char-server and it s connected mapservers, // キャラサーバーは、同じアカウントが他のキャラサーバーでログオンされるかどうかわかることができません。 // online_check yes // Minimum GM level that is allowed to bypass the server limit of users. // 接続人数制限を無視できるGMのレベル gm_allow_level 99 // How often should the server save all files? (In seconds) // Note Applies to all data files on TXT servers. // On SQL servers, it applies to guilds (character save interval is defined on the map config) // どのぐらいの時間でサーバーはsavedataを保存するか (秒単位) // Note Applies to all data files on TXT servers. // On SQL servers, it applies to guilds (character save interval is defined on the map config) autosave_time 60 // Display information on the console whenever characters/guilds/parties/pets are loaded/saved? // キャラ、ギルド、パーティー、ペットをロードまたはセーブした時にログを表示するかどうか save_log yes // Character server flatfile database // キャラクター(キャラサーバー)のセーブファイル char_txt save/athena.txt // Friends list flatfile database // 友達リストのセーブファイル friends_txt save/friends.txt // Start point, Map name followed by coordinates (x,y) // キャラ作成後降り立つMAP、.gatは必要ないようだ start_point new_1-1,53,111 // Starting weapon for new characters // 新しいキャラクターがはじめから持っている武器 start_weapon 1201 // Starting armor for new characters // 新しいキャラクターがはじめから持っている防具 start_armor 2301 // Starting zeny for new characters // 新しいキャラクターがはじめから持っているZeny start_zeny 0 // Size for the fame-lists // 名声リストのランキング数(上からアルケミ、黒スミス、テコン) fame_list_alchemist 10 fame_list_blacksmith 10 fame_list_taekwon 10 // Guild earned exp modifier. // Adjusts taxed exp before adding it to the guild s exp. For example, if set // to 200, the guild receives double the player s taxed exp. // ギルドexpの変更 // ギルドに必要なexpを変更します。たとえば200に設定すれば2倍の経験値が必要になります。 guild_exp_rate 100 // Name used for unknown characters // 存在しないキャラクターに使う名前 unknown_char_name Unknown // To log the character server? // キャラサーバーのログを残すか。 log_char 1 // Log Filename // ログのファイルの名前 char_log_filename log/char.log // Allow or not identical name for characters but with a different case (upper/lower) // example Test-test-TEST-TesT; Value 0 not allowed (default), 1 allowed name_ignoring_case no // Manage possible letters/symbol in the name of charater. Control character (0x00-0x1f) are never accepted. Possible values are // NOTE Applies to character, party and guild names. // 0 no restriction (default) // 1 only letters/symbols in char_name_letters option. // 2 Letters/symbols in char_name_letters option are forbidden. All others are possibles. char_name_option 0 // Set the letters/symbols that you want use with the char_name_option option. // Note Don t add spaces unless you mean to add space to the list. char_name_letters abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 // Character rename option. When set to yes, the server will send an extended // char-info packet, informing whether the character can be renamed or not. // NOTE This functionality is not implemented. // NOTE This option is for compatibility with kRO sakray 2006-10-23 and newer. // !Do not use it for any other type of client since it will crash them! // キャラクター名称変更設定。 yesにセットすると、 サーバーはキャラクターに関するパケットを送信します。 // キャラクターは名称変更をできる、またはできないようになります。 // メモ この機能は以下の条件を満たしていなければ使用できません。 // メモ このオプションは kRO sakray 2006-10-23 より新しい蔵でなければ使用できません。 // これら以外の蔵では絶対に使用しないでください、クラッシュするよ! char_rename yes // How many Characters are allowed per Account ? (0 = disabled) [SQL Only!] chars_per_account 0 // Restrict character deletion by BaseLevel // 0 no restriction (players can delete characters of any level) // -X you can t delete chars with BaseLevel = X // Y you can t delete chars with BaseLevel = Y // e.g. char_del_level 80 (players can t delete characters with 80+ BaseLevel) // ベースレベルによるキャラクター削除制限 // 0 規制をかけない。 (プレイヤーはどんなレベルでもキャラを削除できます。) // -X ベースレベルがX以上にならなければ削除できない // Y ベースレベルがY以上だと削除できない // 例: char_del_level 80 (プレイヤーはレベル80以上のキャラクターを消すことができない。) char_del_level 0 // What folder the DB files are in (item_db.txt, etc.) // データベースファイ(db)のフォルダの場所 db_path db //NOTE The following online listing options are only for TXT servers. // Filename of the file which receives the online players list in text // オンラインプレイヤーのリストを受け取るファイルの名前 online_txt_filename online.txt // Filename of the file which receives the online players list, but in html version // オンラインプレイヤーのリストを受け取るファイルの名前(HTML板) online_html_filename online.html // Choose how to display online players. // (sorting operation with a lot of online players can take time on a slow computer) // 0 no sorting (default) // 1 by alphabetical order of their name // 2 by number of their zenys // 3 by their base level // 4 by their job (and job level inside the same job) // 5 by alphabetical order of their actual map location // オンラインプレーヤーを示表示する方法を選んでください。 // (sorting operation with a lot of online players can take time on a slow computer) // 0 no sorting (default) // 1 by alphabetical order of their name // 2 by number of their zenys // 3 by their base level // 4 by their job (and job level inside the same job) // 5 by alphabetical order of their actual map location online_sorting_option 0 // Choose which columns that you want display in the online files. Do the addition of these values // (if value is 0, no file is done) // 1 name (just the name, no function like GM ) // 2 job // 4 levels // 8 map name // 16 mapname and coordonates // 32 zenys // 64 name (with GM if the player is a GM) // default value 1 (only name) online_display_option 1 // minimum GM level to display GM when we want to display it (default 1) // GMがログインしているかどうかを見れるGMのレベル online_gm_display_min_level 20 // refresh time (in sec) of the html file in the explorer (default 20) online_refresh_html 20 import conf/import/char_conf.txt